// test_orthogonal.cpp
#include "orthogonal_core.h"
#include <iostream>
#include <cassert>

using namespace cbConfig;

void TestBasicProfile() {
    std::cout << "=== Testing Basic BuildProfile ===" << std::endl;

    BuildProfile profile;
    profile.name = "Desktop_Debug";
    profile.variant = BuildVariant::DEBUG;
    profile.os = OSFamily::WINDOWS;
    profile.architecture = ArchBits::BITS_64;
    profile.floatPrecision = FloatMode::DOUBLE;
    profile.compiler = Toolchain::GCC;

    std::cout << "Profile ID: " << profile.GetId().ToStdString() << std::endl;
    std::cout << "Is Cross Compile: " << profile.IsCrossCompile() << std::endl;
    std::cout << "Legacy Name: " << profile.ToLegacyName().ToStdString() << std::endl;
    std::cout << "Is Valid: " << profile.Validate() << std::endl;

    auto flags = profile.GetCompilerFlags();
    std::cout << "Compiler Flags:" << std::endl;
    for (const auto& flag : flags) {
        std::cout << "  " << flag.ToStdString() << std::endl;
    }
}

void TestLegacyConversion() {
    std::cout << "\n=== Testing Legacy Conversion ===" << std::endl;

    auto profile1 = BuildProfile::FromLegacy("Win32_Debug");
    std::cout << "Win32_Debug -> " << profile1.ToLegacyName().ToStdString() << std::endl;

    auto profile2 = BuildProfile::FromLegacy("x64_Release");
    std::cout << "x64_Release -> " << profile2.ToLegacyName().ToStdString() << std::endl;
}

int main() {
    TestBasicProfile();
    TestLegacyConversion();

    std::cout << "\nAll tests passed!" << std::endl;
    return 0;
}
